import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elementZH from 'element-ui/lib/locale/lang/zh-CN'
import elementEN from 'element-ui/lib/locale/lang/en'
import menusZH from './zh'
import menusEN from './en'
Vue.use(VueI18n)

export default new VueI18n({
  locale: localStorage.getItem('lang') || 'zh',
  messages: {
    zh: {
      morning: '早安',
      goodDay: '祝你开心每一天！',
      ...elementZH,
      ...menusZH
    },
    en: {
      morning: 'good morning!',
      0: 'Have a good day!',
      ...elementEN,
      ...menusEN
    }
  }
})
